/*
 * matMultTest.cu
 *
 *  Created on: Apr 6, 2011
 *      Author: curt
 */

#include "CUDA_vec.h"
#include "CUDA_Poisson.h"
#include <stdio.h>
typedef CUDA_vec<float> Vector;
typedef CUDA_Poisson Matrix;


#define USAGE "Usage:\n matMultTest -p P -ntrials Ntrials -smem Bool \n"

int main(int argc, char * argv[])
{
	if(argc!=7)
	{
		printf( "%s", USAGE);
		exit(1);
	}
	int p = atoi(argv[2]);
	int N = (1<< p) - 1;
	Vector x(N*N); Vector b(N*N);
	x.set_constant(N);
	Matrix A(atoi(argv[6])==1);
	int ntrials = atoi(argv[4]);

	for(int i=0; i<ntrials; i++)
	{
		A(x,b);
	}

	return 0;
}
